package com.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.pojo.SysUser;
import com.pojo.vo.SysUserVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserMapper extends BaseMapper<SysUser> {
    @Select("SELECT u.*,role_name  FROM sys_user AS u LEFT JOIN sys_role AS r ON u.usr_role_id=r.role_id")
    List<SysUserVo> getList();

    @Select("SELECT * FROM sys_user where usr_name=#{usrName} and usr_password=#{usrPassword}")
    SysUser login(String usrName,String usrPassword);
}
